package com.etoak.controller;

import com.etoak.entity.Department;
import com.etoak.mapper.DepartmentMapper;
import com.etoak.service.DepartmentService;
import com.etoak.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.w3c.dom.stylesheets.LinkStyle;

import java.util.List;

/**
 * 数据字典 部门表
 */
@RestController
@RequestMapping("/department")
public class DepartmentController {
    @Autowired
    DepartmentService departmentService;

    @GetMapping("/list")
    public ResultVO<List<Department>> list(){
        List<Department> departmentList=departmentService.list();
        return ResultVO.success(departmentList);
    }

}
